OR
[Logical Operator] - Returns True or False for a logic comparsion
Syntax:
argument1 OR argument2
Parameters:
argument1: any argument
argument2: another argument
Description:
Performs the Logical Disjunction and returns TRUE if any of the arguments is TRUE.
Logicals operators are like in ZX Spectrum Basic. Their result can be either False (which is represented with 0) or True, which might be any other value. Don't expect True value number to be always 1. If you need 0/1 values for boolean evaluations, use --strict-boolean compiler option. This might add a little overhead to boolean evaluations, tough.
a | b | Result |
---|---|---|
False | False | False |
False | True | True |
True | False | True |
True | True | True |
Examples:
REM 'Or LET a = -1 LET b = 17 IF a<0 OR b=17 THEN PRINT "looks like a is smaller than zero or b is equal to 17" END IF
Notes:
See also:
Supported Plattforms:
ZX Spectrum